package exception;

import java.io.FileOutputStream;

public class AutoCloseadleDemo {
    public static void main(String[] args) {
        try(FileOutputStream fos=new FileOutputStream("abc.txt")) {
            fos.write(100);
        }catch (Exception e){
            System.out.println("写入出错");
        }
    }
}
